using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;



namespace ClientApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            ClientApplications ca = new ClientApplications();
            Console.WriteLine("========Client========\n");
            Thread ta = new Thread(ca.Receive);



            ta.Start();
            Thread.Sleep(1000);
            while (true)
            {
                if (ca.connected)
                {

                    if (!ca.isLoggedIn)
                    {

                        ca.sendLogin();
                        Thread.Sleep(100);
                    }
                }
            }

            //ca.sendJudgeScore();

            //ca.registerUser();

            //ca.sendDive();

            Console.ReadLine();
        }
    }
}